<template>
    <div>
        <router-link to="/">NAME组件</router-link>--
        <router-link to="/user">USER组件</router-link>--
        <router-link to="/edu/wang/18">EDU组件</router-link>--
        <router-link to="/edu/wang/15">复用</router-link>--
        <!-- <router-link to="/kiss">USER别名kiss</router-link>--
        <router-link to="/aaa">LOSS错误地址</router-link> -->

        <button @click="Fn">click</button>
        <router-view></router-view>
    </div>
</template>

<script>
export default {
    data(){
        return{
            form:{name:'zhangsan',age:18}
        }
    },
    methods:{
        Fn(){
            // this.$router.push('/user')
            // this.$router.push({path:'/user'})
            this.$router.push({name:"user",params:this.form})
        }
    },
    watch:{
        $router(to , from){
            console.log(to)
            console.log(from)
        }
    }
};
</script>

<style scoped>
</style>